<if condition="$type == 'image'">
    <div class="clearfix file-browser">
        <style type="text/css">
            .modal-dialog .file-browser .breadcrumb i{ font-size:1em;}
        </style>
        <ol class="breadcrumb">
            <li><a herf="javascript:;" onclick="{$callback}.browser();"><i class="fa fa-home">&nbsp;</i></a></li>
            <foreach name="crumbs" item="crumb">
                <li><a herf="javascript:;" onclick="{$callback}.browser('{$crumb[1]}');">{$crumb[0]}</a></li>
            </foreach>
        </ol>
        <foreach name="files" item="file">
            <if condition="$file['is_dir']">
                <if condition="$file['filename'] == '..'">
                    <div title="上一级" onclick="{$callback}.browser('{$parentPath}');" class="thumbnail">
                        <i class="fa fa-folder"></i>
                        <span class="text-center">{$file['filename']}</span>
                    </div>
                    <else/>
                    <div title="{$file['filename']}" onclick="{$callback}.browser('{$path}{$file['filename']}');" class="thumbnail">
                        <i class="fa fa-folder"></i>
                        <span class="text-center">{$file['filename']}</span>
                    </div>
                </if>
                <else/>
                <div title="{$file['filename']}" class="thumbnail{$currentImage == $file['url'] ? ' active' : ''}">
                    <em><img src="{$file['url']}" onclick="{$callback}.select({$file['entry']});" class="img-responsive"></em>
                    <span class="text-center">{$file['filename']}</span>
                    <em class="close" title="删除这张图片" onclick="{$callback}.delete('{$path}{$file['filename']}');return false;">×</em>
                </div>
            </if>
        </foreach>
    </div>
    <else/>
    <div class="clearfix file-browser">
        <style type="text/css">
            .modal-dialog .file-browser .breadcrumb i{ font-size:1em;}
        </style>
        <ol class="breadcrumb"></ol>
        {loop $files $file}
        {if $file['is_dir']}
        {if $file['filename'] == '..'}
        <div title="上一级" onclick="{$callback}.browser('{php echo str_replace('\\', '/', dirname($path));}');" class="thumbnail">
            {else}
            <div title="{$file['filename']}" onclick="{$callback}.browser('{$path}{$file['filename']}');" class="thumbnail">
                {/if}
                <i class="fa fa-folder"></i>
                <span class="text-center">{$file['filename']}</span>
            </div>
            {else}
            <div title="{$file['filename']}" class="thumbnail">
                <em><img src="./resource/images/nopic.jpg" onclick="{$callback}.select({$file['entry']});" class="img-responsive"></em>
                <span class="text-center">{$file['filename']}</span>
                <em class="close" title="删除这首音乐" onclick="{$callback}.delete('{$file['attachment']}', '{$path}');return false;">×</em>
            </div>
            {/if}
            {/loop}
        </div>
    </div>
</if>
